function addSubCategoriesApi(data){
    return axios.post('/subCategories', data)
}

function pageApi(page, pageSize, name) {
    return axios.get('/subCategories/page', {
        params: {
            page: page,
            pageSize: pageSize,
            name: name
        }
    })
}

function getCategoryByIdApi(id) {
    return axios.get(`/subCategories/${id}`)
}

function updateCategoryApi(data) {
    return axios.put('/subCategories', data)
}

function delCategoryApi(id){
    return axios.delete(`/subCategories/${id}`)
}
